package com.team233.zuccecho.Bean;

import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Component;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.List;


@Entity
@Getter
@Setter
public class Teacher implements Serializable {
    @Id
    @Column(name="teacher_id")
    private String tea_id;
    @Column(name="teacher_name",nullable = false)
    private String tea_name;
    @Column(name="teacher_pwd",nullable = false)
    private String tea_pwd;
    @Column(name="register_time")
    private Timestamp registerTime;
    @Column(name="modify_time")
    private Timestamp modifyTime;
    @Column(name="if_admin")
    private int if_admin;

//    @OneToMany(fetch=FetchType.LAZY)
//    @JoinColumn(name="course_id")
//    private List<Course> courses;

    public Teacher() {

    }

    @Override
    public String toString() {
        return "Teacher{" +
                "teaID='" + tea_id + '\'' +
                ", teaName='" + tea_name + '\'' +
                '}';
    }
}
